package com.wlyuan.index.api.waybill.dto;

import com.wlyuan.tools.Authentication;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.List;

interface IDivide {
}

/**
 * @author yuanjie
 */
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class WaybillDivideDTO<T extends IDivide> extends Authentication {


    @ApiModelProperty("运单ID")
    @NotNull(message = "运单ID不能为空")
    private Long waybillId;

    @ApiModelProperty("1 线路拆单 2 数量拆单 ")
    @NotNull(message = "拆单模式不能为空")
    private Integer mode;

    abstract List<T> getDivides();
}
